﻿window.addEvent("domready",function(){
/*导航上鼠标浮动效果 */
$$(".navj").each(function(el){
	el.addEvents({
		mouseover:function(){
		    if(this.getChildren().length !==1){
			    this.getChildren("a .bcbc").addClass("bcbcjs");
				this.getChildren("a .red").addClass("bcbcjs");
				this.getChildren("a p").set({
				    'styles':{
					    'border':'1px solid #bcbcbc',
						'border-right':'none',
						'z-index':'200',
						'width':'180px',
						'font': 'bold 16px/28px 宋体'
					}
				});
				this.getChildren('ul').addClass("navijs");
            }
            else{
			    this.set({
				    'styles':{
					    'border':'1px solid #bcbcbc',
						'font': 'bold 16px/28px 宋体'
					}
				});
			}			
		},
		mouseleave:function(){
			if(this.getChildren().length ==1){
			    this.set({
				    'styles':{
					    'border':'none',
						'font': '16px/28px 宋体'
					}
				});
			}
            else{			
				this.getChildren("a .bcbc").removeClass("bcbcjs");
				this.getChildren("a .red").removeClass("bcbcjs");
				this.getChildren("a p").set({
				    'styles':{
					    'border':'none',
						'z-index':'0',
						'width':'auto',
						'font': '16px/28px 宋体'
					}
				});
				this.getChildren('ul').removeClass("navijs");
			}	
		}
	});
});
})